#!/usr/bin/env python3
# -*- coding: utf-8 -*-

def counter():
    i = 0
    def add():
        nonlocal i
        i = i + 1
        return i
    return add

count = counter()
print(count())
print(count())
print(count())
